package org.ala.tiktools.pacemaker.wakeups;

import org.ala.tiktools.pacemaker.IReject;
import org.ala.tiktools.pacemaker.IWakeupError;
import org.ala.tiktools.pacemaker.IWakeuper;

/**
 * @author ala
 * @date 2024-12-19 01:45
 */
public class FixedIntervalTaskItem {


    /**
     *  任务间隔单位
     */
    protected int unit;
    /**
     *  任务内容
     */
    protected IWakeuper task;
    /**
     * 异常回调
     */
    protected IWakeupError error;
    /**
     *  拒绝策略
     */
    protected IReject reject;

    public FixedIntervalTaskItem(int unit, IWakeuper task, IWakeupError error, IReject reject) {
        this.unit = unit;
        this.task = task;
        this.error = error;
        this.reject = reject;
    }

    public int getUnit() {
        return unit;
    }

    public void setUnit(int unit) {
        this.unit = unit;
    }

    public IWakeuper getTask() {
        return task;
    }

    public void setTask(IWakeuper task) {
        this.task = task;
    }

    public IWakeupError getError() {
        return error;
    }

    public void setError(IWakeupError error) {
        this.error = error;
    }

    public IReject getReject() {
        return reject;
    }

    public void setReject(IReject reject) {
        this.reject = reject;
    }
}
